.bodybox-wrap {
    position: relative;
}

.editor-upload-progress {
    position: absolute;
    width: 0%;
    overflow: hidden;
    background: #38abe3 url(../../../applications/dashboard/design/images/upload-progress-back.gif) repeat;
    margin: -2px 0 0 0;
    width: 0;
    height: 5px;
    border: 1px solid #38abe3;
    opacity: 0;
    box-shadow: 0 1px 2px -1px #fff;
    box-sizing: border-box;
}

.editor-upload-progress.fade-out {
    opacity: 0 !important;
    transition: opacity 0.7s ease;
}

.editor-drop-cue {
    .BodyBox,
    iframe.wysihtml5-sandbox {
        border: 2px dashed rgba(0, 0, 0, 0.25) !important;
        border-radius: 2px !important;
    }
}

.editor-upload-attention {
    display: none;
    position: absolute;
    top: 15px;
    width: 160px;
    left: 50%;
    margin-left: -80px;
    text-align: center;
    font-size: 18px;
    color: #fff;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.4);
    padding: 10px 0;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 2px;
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
    pointer-events: none;
    z-index: 500;
}

.editor-drop-cue .editor-upload-attention {
    display: block;
}

/* If editor is fullpage */
#editor-fullpage-candidate {
    .editor-upload-progress {
        margin: 0;
    }

    .editor-upload-attention {
        top: 60px;
    }
}

.editor-upload-previews,
.editor-upload-saved {
    overflow: hidden;
    padding: 5px;
    margin: 0 -10px;
    box-sizing: border-box;
    position: relative;
}

.editor-file-preview {
    position: relative;
    float: left;
    height: $file-preview-height;
    width: 220px;
    padding: 0;
    margin: 5px;
    overflow: hidden;
    font-size: 12px;
    color: #999;
    text-shadow: 0 0 1px #fff;
    background-color: #eaeaea; /*rgba(0,0,0,0.05);*/
    border: $file-preview-border-width solid #fff;
    border-radius: 2px;
    box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.2);
    box-sizing: border-box;

    /* This is for the transition when removing/reattaching files. Height
  is necessary due to floated elements and width, which cause them to
  occupy space under image until width is full. */
    transition: all 0.1s ease;
    animation-duration: 0.8s;
    animation-name: editor-file-preview;
    animation-fill-mode: both;
    animation-duration: 0.4s;

    .file-preview {
        display: block;
        float: left;
        width: $file-preview-size-inner;
        height: $file-preview-size-inner;

        &.img {
            padding: 0;
            background-position: center;
            background-size: 50px auto;
        }

        &.icon-file {
            font-size: 18px;
            line-height: $file-preview-size-inner;
            text-align: center;
        }
    }

    .file-data {
        float: left;
        width: 158px;
        padding: 2px 0;
        margin: 0 0 0 5px;
        line-height: (($file-preview-size-inner - (2px * 2)) * 0.5);

        .filename {
            display: block;
            width: 100%;
            overflow: hidden;
            color: rgba(0, 0, 0, 0.75);
            white-space: nowrap;
            text-overflow: ellipsis;
        }

        .meta {
            display: block;
            margin: 0;
            font-size: 10px;

            em {
                font-style: italic;
            }
        }
    }

    .editor-file-remove {
        float: right;
        height: $file-preview-size-inner;
        cursor: pointer;
        background-color: #fff;
        box-shadow: inset 2px 0 2px -3px #000;
    }

    .editor-file-remove:after {
        display: block;
        width: 24px;
        font-family: Arial, sans-serif; // Arial offers more consistent sizing
        font-size: 14px;
        line-height: $file-preview-size-inner;
        text-align: center;
        content: "\00D7";
    }

    .editor-file-remove:hover:after {
        font-weight: bold;
        color: $white;
        text-shadow: 0 0 1px rgba($black, 0.6);
    }

    .editor-file-reattach {
        display: none;
    }

    /* File permissions */

    &.file-readonly {
        .file-data {
            width: 178px;
        }

        .editor-file-remove,
        .editor-file-reattach {
            display: none;
        }
    }
}

/* Any files in this wrapper have no delete options. Only when moved into
.editor-upload-previews will the options be activated */
.editor-upload-readonly {
    .file-data {
        width: 178px;
    }

    .editor-file-remove,
    .editor-file-reattach,
    .in-body {
        display: none;
    }
}

.editor-file-removed {
    width: 32px;
    height: 32px;
    opacity: 0.25 !important;

    .editor-file-reattach {
        display: block;
        height: 100%;
        width: 100%;
        opacity: 0;
        position: relative;
        z-index: 10;
        cursor: pointer;
    }
}

@keyframes editor-file-preview {
    0% {
        opacity: 0;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}
